<!DOCTYPE html>
<html>
<head>
<title>国家管理</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="stylesheet" href="../public/css/bootstrap.min.css">
<link rel="stylesheet" href="../public/css/font-awesome.min.css">
<link rel="stylesheet" href="../public/plugins/jqgrid/ui.jqgrid-bootstrap.css">
<link rel="stylesheet" href="../public/plugins/ztree/css/metroStyle/metroStyle.css">
<link rel="stylesheet" href="../public/css/main.css">
<link rel="stylesheet" type="text/css" href="../public/plugins/layui/css/layui.css">
<script src="../public/libs/jquery.min.js"></script>
<script src="../public/plugins/layer/layer.js"></script>
<script src="../public/libs/bootstrap.min.js"></script>
<script src="../public/libs/vue.min.js"></script>
<script src="../public/plugins/jqgrid/grid.locale-cn.js"></script>
<script src="../public/plugins/jqgrid/jquery.jqGrid.min.js"></script>
<script src="../public/plugins/ztree/jquery.ztree.all.min.js"></script>
<script src="../public/js/common.js"></script>
<script type="text/javascript" src="../public/plugins/layui/layui.js"></script>
<style type="text/css">
	.select-flag {
		border: 1px green solid;
	}
</style>
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
		<div class="grid-btn">
			<div class="form-group col-sm-2">
				<input type="text" class="form-control" v-model="q.key" @keyup.enter="query" placeholder="">
			</div>
			<a class="btn btn-default" @click="query">查询</a>
			
			<a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			<a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			<a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
		</div>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>
    
   	<div v-show="!showList" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">
			<input type="hidden" name="id" class="form-control" v-model="country.id" />
			<div class="form-group">
			   	<div class="col-sm-1 control-label">洲</div>
			   	<div class="col-sm-5">
					<select name="contientId" class="form-control" v-model="country.contientId">
						<option v-for="item in contients" :value="item.id">{{item.name}}</option>
					</select>
			    </div>
			    <div class="col-sm-1 control-label">名称</div>
			   	<div class="col-sm-5">
					<input type="text" name="name" class="form-control" v-model="country.name" placeholder="国家名"/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-1 control-label">英文名</div>
			   	<div class="col-sm-5">
					<input type="text" name="enName" class="form-control" v-model="country.enName" placeholder="英文名"/>
			    </div>
			    <div class="col-sm-1 control-label">首字母</div>
			   	<div class="col-sm-5">
					<input type="text" name="firstCharacter" class="form-control" v-model="country.firstCharacter" placeholder="首字母"/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-1 control-label">国旗图片</div>
			   	<div class="col-sm-5">
			    	<input type="text" style="cursor:pointer;" v-model="country.countryFlagName"
			    		@click="showFlag" class="form-control" placeholder="国旗图片(点击选择)" readonly="readonly"/>
			    </div>
			    <div class="col-sm-1 control-label">图标</div>
			   	<div class="col-sm-5">
			    	<input type="text" name="icon" v-model="country.iconName" style="cursor:pointer;"
			    		@click="showIcon" class="form-control" placeholder="图标" readonly="readonly"/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-1 control-label">图片</div>
			   	<div class="col-sm-5">
			    	<!-- <input type="text" name="imgFile" class="form-control" v-model="country.img" placeholder="图片"/> -->
			    	<input type="text" name="icon" v-model="country.imgName" style="cursor:pointer;"
			    		@click="showImg" class="form-control" placeholder="图片" readonly="readonly"/>
			    </div>
			    <div class="col-sm-1 control-label">通过率</div>
			   	<div class="col-sm-5">
			    	<input type="text" name="passRate" class="form-control" v-model="country.passRate" placeholder="通过率"/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-1 control-label">办理件数</div>
			   	<div class="col-sm-5">
			    	<input type="text" name="transactNum" class="form-control" v-model="country.transactNum" placeholder="办理件数"/>
			    </div>
			    <div class="col-sm-1 control-label">备注</div>
			   	<div class="col-sm-5">
			    	<input type="text" name="remark" class="form-control" v-model="country.remark" placeholder="备注"/>
			    </div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label"></div> 
				<input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
				&nbsp;&nbsp;
				<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
		</form>
	</div>
	<div id="showFlag" style="display: none;">
    	<div class="grid-btn" style="margin-top:10px;">
			<div class="col-sm-6">
				<input type="text" class="form-control" v-model="q.flagkey" @keyup.enter="queryFlag" placeholder="">
			</div>
			<a class="btn btn-default" @click="queryFlag">查询</a>
		</div>
		<div class="col-sm-12">
			<div class="panel panel-default col-sm-2 text-center" v-for="item in nationalFlagList" @click="selectFlag">
				<img :src="baseUrl + item.shortUrl">
				<div class="country-name" :data="item.shortUrl">{{item.countryName}}</div>
			</div>
		</div>
    </div>
    <div id="showFile" style="display: none;">
    	<div class="grid-btn" style="margin-top:10px;">
			<div class="col-sm-6">
				<input type="text" class="form-control" v-model="q.filekey" @keyup.enter="queryFile" placeholder="">
			</div>
			<a class="btn btn-default" @click="queryfile">查询</a>
		</div>
    	<table id="fileJqGrid"></table>
	    <div id="fileJqGridPager"></div>
    </div>
    
    <div id="show" style="display: none;">
		<div class="form-group">
			<div class="form-group">
			   <img alt="" :src="url">
			</div>
		</div>
	</div>
</div>

<script src="../public/js/qygj/country.js"></script>
</body>
</html>